import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 涛
 * Date: 2023-09-21
 * Time: 19:19
 */
//public class Config {
//    File file;
//    public void openConfig(String filename) throws FileNotFoundException{
//        if(filename.equals("config.ini")) {
//            throw new FileNotFoundException("文件名不对");
//        }
//        //打开文件
//    }
//    public void readConfig() {
//
//    }
//}

public class Config {
    File file;
    public void openConfig(String filename) throws IOException{
        if(filename.equals(".ini")) {
            throw new IOException("没有.ini文件");
        }
        if(filename.equals("config.ini")) {
            throw new FileNotFoundException("文件名不对");
        }
        //打开文件
    }
    public void readConfig() {

    }

    public static void main(String[] args) throws IOException{
        Config config = new Config();
        config.openConfig("config.in");
    }
}
